<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>着色器GLSL到WGSL语言的转换</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">

    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }

        .container-parent {
            display: flex;
            height: calc(100vh - 50px);
            margin-top: 80px;
            margin-bottom: 50px;
        }

        #container, #container1 {
            border: 1px solid grey;
            box-sizing: border-box;
            width: 50%;
            padding: 20px;
            background-color: white;
        }

        h1 {
            text-align: center;
            margin-bottom: 20px;
            color: #333;
            font-size: 24px;
        }

        a {
            color: #007BFF;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        .controls {
            position: absolute;
            left: 25px;
            top: 20px;
            background-color: white;
            padding: 10px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        select {
            margin-left: 5px;
            margin-right: 5px;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 3px;
        }

        .controls a {
            margin-right: 10px;
        }

        .controls label {
            margin-right: 5px;
        }
    </style>
</head>

<body>

    <div class="controls">
        <a href="http://www.feng3d.com">feng3d网站</a>
        /
        <a href="https://gitee.com/feng3d/glsl2wgsl">源码</a>
        /
        <a href="https://feng3d.com/glsl2wgsl/docs">文档</a>
        <label>单文件或程序：</label> <select id="select_is_program"></select>
        <label>着色器名称：</label>
        <select id="select"></select>
        <select id="select_program"></select>
        <label>转换方式：</label> <select id="select_target"></select>
    </div>

    <div class="container-parent">
        <div id="container"></div>
        <div id="container1"></div>
    </div>

    <script>
        // Monaco uses a custom amd loader that overrides node's require.
        // Keep a reference to node's require so we can restore it after executing the amd loader file.
        var nodeRequire = window.require;
    </script>
    <script src="./monaco-editor/min/vs/loader.js"></script>
    <script>
        // Save Monaco's amd require and restore Node's require
        var amdRequire = window.require;
        window.require = nodeRequire;
    </script>

    <script type="module" src="./index.ts"></script>

    <iframe id="viewer" name="viewer" style="display: none;"></iframe>
</body>

</html>